package com.li.mapper;

import com.github.pagehelper.Page;
import com.li.pojo.dto.UserPageDTO;
import com.li.pojo.po.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.li.pojo.vo.UserVO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 
 * @since 2024-04-13
 */
public interface UserMapper extends BaseMapper<User> {

    List<UserVO> getUsersList(UserPageDTO userPageDTO);

    void updateUser(User user);

    @Select("select * from sys_user where user_name=#{username}")
    User selectByUsername(String username);

    @Select("select * from sys_user where dept_id = #{deptId}")
    List<User> getByDeptId(Integer deptId);
}

